<?php $this->load->view('common/ck-bosspagehead'); ?>
<?php $this->load->view('common/ck-bossheader'); ?>
<article id="content">
    <div class="pgwrapper">
    <div class="w960 bg1 p15 bx_shw">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="20%" style="border-right: 2px solid #e5e5e5;" valign="top">
		<?php $this->load->view('enterprises/leftnavCMS'); ?>
		</td>
		<td width="80%" valign="top" style="padding:5px;"><form enctype="multipart/form-data"
				action="/updateCategory" onsubmit="return validateForm()" method="POST">
				<table width="100%" border="0" cellpadding="5" cellspacing="0"
					style="padding: 0px 30px;">
					<input type="hidden" value="<?php echo $category_id;?>" id="category_id" name="category_id">

					<tr>
						<td class="txt-blck" width="30%">Category Name</td>
						<td width="70%"><input type="text" onblur="makeURLCategory(this)"
							value="<?php echo $categoryDetailsArray[0]['category_name'];?>"
							name="category_name" id="category_name" class="inputCMS"
							  />
						</td>
					</tr>
					<tr>
						<td class="txt-blck" width="30%">Category Url</td>
						<td width="70%"><input type="text"
							value="<?php echo $categoryDetailsArray[0]['category_url'];?>"
							name="category_url" id="category_url" class="inputCMS"
							  />
						</td>
					</tr>
					<tr>
						<td class="txt-blck">Category Status:</td>
						<td><select id="category_status" name="category_status">
								<option value="Yes"
								<?php if ($categoryDetailsArray[0]['category_status']=="Yes"){echo "selected"; }?>>Yes</option>
								<option value="No"
								<?php if ($categoryDetailsArray[0]['category_status']=="No"){echo "selected"; }?>>No</option>
						</select></td>
					</tr>
                    <tr>
						<td valign="top" class="txt-blck">Category Description:</td>
						<td><textarea style="width: 450px; height: 300px;" class="inputCMS"
								id="category_description" name="category_description"><?php echo $categoryDetailsArray[0]['category_description'];?></textarea></td>
					</tr>
					<tr>
						<td class="txt-blck" width="30%">Metatitle:</td>
						<td width="70%"><input type="text" value="<?php echo $categoryDetailsArray[0]['metatitle'];?>" name="metatitle"
							id="metatitle" class="inputCMS" style="width: 450px;"  />
						</td>
					</tr>
					<tr>
						<td class="txt-blck" width="30%">Metakeyword:</td>
						<td width="70%"><input type="text" value="<?php echo $categoryDetailsArray[0]['metakeyword'];?>" name="metakeyword"
							id="metakeyword" class="inputCMS" style="width: 450px;"  />
						</td>
					</tr>
					<tr>
						<td class="txt-blck" width="30%">Metadescription:</td>
						<td width="70%"><input type="text" value="<?php echo $categoryDetailsArray[0]['metadescription'];?>" name="metadesc"
							id="metadesc" class="inputCMS"  style="width: 450px;" />
						</td>
					</tr>
					<tr>
						<td></td>
						<td><input type="submit" name="code_submit" value="Submit" /></td>
					</tr>
				</table>
			</form>
		</td>
	</tr>
</table>
</div>
</div>
</article>
<div class="clr-both spacer-10">&nbsp;</div>
<?php $this->load->view('common/ck-bossfooter'); ?>
<script>

function validateForm(){
	var x = document.getElementById('category_name').value;
	if(x==""){
	alert("Category Name must be filled out.");
	return false;
	}
	var y = document.getElementById('category_url').value;
	if(y==""){
	alert("Category Url must be filled out.");
	return false;
	}
}
</script>